package com.castle.fortress.admin.flowable.dto;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 审批用户实体类
 * @author castle
 */
@Data
public class ApproveUserDto {
    private static final long serialVersionUID = 1L;


    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("主键id")
    @TableId(
            value = "id",
            type = IdType.ASSIGN_ID
    )
    private Long id;
    @ApiModelProperty("登录名")
    private String loginName;
    @ApiModelProperty("昵称")
    private String nickname;
    @ApiModelProperty("真实姓名")
    private String realName;
    @ApiModelProperty("电话")
    private String phone;
    @ApiModelProperty("审批状态")
    /**
     * 00 待审核 01 审核中 02 通过 03 驳回 04 委派
     */
    private String approveStatus="00";
    @ApiModelProperty("审批意见")
    private String approveOpinion;
    @DateTimeFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @ApiModelProperty("审批时间")
    private Date approveDate;
    @ApiModelProperty("是否可操作")
    /**
     * 00 不可操作 01 可操作
     */
    private String optFlag="00";
    /**
     * 评论ID
     */
    private String commId;
    /**
     * 评论图片
     */
    private String image;
    /**
     * 评论附件
     */
    private String file;
    @DateTimeFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @JsonFormat(
            pattern = "yyyy-MM-dd HH:mm:ss"
    )
    @ApiModelProperty("任务开始时间")
    private Date startDate;
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("耗时")
    private Long timeConsuming;
}
